package lab02.test03;

/**
 * Created by ASUS on 2017/10/12.
 */
public class Student {
    //属性
    float computerScore;
    float matchScore;
    float englishScore;

    //行为
    float sum(){
        return computerScore+matchScore+englishScore;
    }
    float average(){
        return (computerScore+matchScore+englishScore)/3;
    }
    float maxScore(){
         if((computerScore>matchScore)&&(computerScore>englishScore))
         return computerScore;
        else if ((matchScore>computerScore)&&(matchScore>englishScore))
            return matchScore;
        else
         return englishScore;
    }
    float minScore(){
        if((computerScore<matchScore)&&(computerScore<englishScore))
            return computerScore;
        else if ((matchScore<computerScore)&&(matchScore<englishScore))
            return matchScore;
        else
            return englishScore;
    }
    void printStudent(){
        System.out.println("计算机成绩"+computerScore);
        System.out.println("数学程序"+matchScore);
        System.out.println("英语成绩"+englishScore);
    }
}
